/*
 * @Author: chengsl
 * @Date: 2023-01-09 15:11:14
 * @LastEditors: chengsl
 * @LastEditTime: 2023-01-09 15:12:21
 * @Description: 多组柱图 widgetBarStackChart
 */
// const arrColor = [
//   { color: '#0060FF' },
//   { color: '#3BD6FF' },
//   { color: '#948BEA' },
//   { color: '#F78D94' },
//   { color: '#FF7A45' },
//   { color: '#FCBB61' },
//   { color: '#36CFC0' }
// ].map((item) => {
//   return item.color
// })

export default {
  grid: { left: 10, right: 40, bottom: 10, top: 50, containLabel: true },
  legend: {
    textStyle: { color: '#A9B2BC', fontSize: 12 },
    show: true,
    left: 'center',
    top: 'top',
    bottom: 'top',
    orient: 'horizontal',
    itemGap: 40,
    itemWidth: 20,
    data: ['攻击', '防御']
  },
  xAxis: {
    type: 'category',
    show: true,
    name: '',
    nameTextStyle: { color: '#fff', fontSize: 14 },
    inverse: false,
    axisLabel: {
      show: true,
      interval: 0,
      rotate: 0,
      textStyle: { color: '#A9B2BC', fontSize: 14 }
    },
    axisLine: { show: true, lineStyle: { color: 'rgba(32,45,92,0.5)' } },
    axisTick: { show: false },
    splitLine: { show: false, lineStyle: { color: '#fff' } },
    data: [
      '2021-07-25',
      '2021-07-26',
      '2021-07-27',
      '2021-07-28',
      '2021-07-29',
      '2021-07-30'
    ]
  },
  yAxis: {
    type: 'value',
    show: true,
    name: '',
    nameTextStyle: { color: '#fff', fontSize: 14 },
    inverse: false,
    axisLabel: {
      show: true,
      rotate: 0,
      textStyle: { color: '#fff', fontSize: 14 }
    },
    axisLine: { show: true, lineStyle: { color: 'rgba(32,45,92,0.5)' } },
    splitArea: {
      show: true,
      areaStyle: { color: ['rgba(32,45,92,0.1)', 'rgba(32,45,92,0.5)'] }
    },
    splitLine: { show: false, lineStyle: { color: 'rgba(32,45,92,0.5)' } },
    data: []
  },
  series: [
    {
      name: '攻击',
      type: 'bar',
      data: ['12', '48', '15', '31', '25', '52'],
      barGap: '0%',
      stack: '',
      barWidth: 30,
      label: {
        show: true,
        position: 'top',
        distance: 10,
        fontSize: 14,
        color: '#fff',
        fontWeight: 'normal'
      },
      itemStyle: { normal: { color: '#0060FF', barBorderRadius: 5 } }
    },
    {
      name: '防御',
      type: 'bar',
      data: ['20', '5', '30', '45', '27', '44'],
      barGap: '0%',
      stack: '',
      barWidth: 30,
      label: {
        show: true,
        position: 'top',
        distance: 10,
        fontSize: 14,
        color: '#fff',
        fontWeight: 'normal'
      },
      itemStyle: { normal: { color: '#3BD6FF', barBorderRadius: 5 } }
    }
  ],
  title: {
    text: '',
    show: true,
    left: 'center',
    textStyle: { color: '#FFD700', fontSize: 20, fontWeight: 'normal' },
    subtext: '',
    subtextStyle: { color: '#fff', fontWeight: 'normal', fontSize: 20 }
  },
  tooltip: {
    trigger: 'axis',
    show: true,
    axisPointer: { type: 'shadow' },
    textStyle: { fontSize: 16 }
  }
}
